package algo.set;

import com.fay.algo.bst.BST_I;

/**
 * @Title:
 * @Description:
 * @Author Fay Wang
 * @Date 2022/5/4 22:25
 * @Version 1.0
 */
public class BSTSet<E extends Comparable<E>> implements Set<E> {

    private BST_I bst;

    public BSTSet() {
        bst = new BST_I();
    }

    @Override
    public void add(E e) {
        bst.add(e);
    }

    @Override
    public boolean contains(E e) {
        return bst.contains(e);
    }

    @Override
    public void remove(E e) {
        bst.remove(e);
    }

    @Override
    public int getSize() {
        return bst.size();
    }

    @Override
    public boolean isEmpty() {
        return bst.isEmpty();
    }
}
